package com.xiushuang.lib_social;

public class SocialManager {
	public static SocialManager instance;
	private String WX_APPID, QQ_APPID, SINA_APPID;
	private SocialAuth socialAuth;
	private SocialShare socialShare;

	public String getWX_APPID() {
		return WX_APPID;
	}

	public void setWX_APPID(String wX_APPID) {
		WX_APPID = wX_APPID;
	}

	public String getQQ_APPID() {
		return QQ_APPID;
	}

	public void setQQ_APPID(String qQ_APPID) {
		QQ_APPID = qQ_APPID;
	}

	public String getSINA_APPID() {
		return SINA_APPID;
	}

	public void setSINA_APPID(String sINA_APPID) {
		SINA_APPID = sINA_APPID;
	}

	public SocialManager() {

	}

	public static SocialManager getInstance() {
		if (instance == null) {
			instance = new SocialManager();
		}
		return instance;
	}

	@SuppressWarnings("incomplete-switch")
	public void setAppKey(SocialEnum socialType, String appid) {
		switch (socialType) {
		case WX:
			setWX_APPID(appid);
			break;
		case QQ_FRIEND:
			setQQ_APPID(appid);
			break;
		case QQ_ZONE:
			setQQ_APPID(appid);
			break;
		}
	}

	public SocialAuth getSocialAuth() {
		if (socialAuth == null) {
			socialAuth = new SocialAuth();
		}
		return socialAuth;
	}

	public SocialShare getSocialShare() {
		if (socialShare == null) {
			socialShare = new SocialShare();
		}
		return socialShare;
	}

}
